package com.zjhcsoft.komm;

import com.zjhcsoft.komm.*;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.security.Restrict;
import org.jboss.seam.framework.EntityHome;

@Name("userHome")
public class UserHome extends EntityHome<User> {

    public void setUserId(Long id) {
        setId(id);
    }

    public Long getUserId() {
        return (Long) getId();
    }

    @Override
    protected User createInstance() {
        User user = new User();
        return user;
    }

    public void wire() {
        getInstance();
    }

    public boolean isWired() {
        return true;
    }

    public User getDefinedInstance() {
        return isIdDefined() ? getInstance() : null;
    }

    @Override
    @Restrict
    public String persist() {
        return super.persist();
    }
}
